﻿using Entity.BaseInfo.Entity;
using Entity.BaseInfo.View.Staff;
using Entity.Blog;
using Entity.System.Entity;
using Entity.System.View.Menu;
using Microsoft.EntityFrameworkCore;

namespace FrameWork.DataContext
{
    public class DataContext : DbContext
    {
        /**
         * 构造函数注入
         */
        public DataContext(DbContextOptions<DataContext> options) : base(options) { }

        protected override void OnModelCreating(ModelBuilder modelBuilder)
        {
           
        }
        
        /**
         * 注入数据库与模型
         */

        /**
         * 系统配置 - System
         */
       
        //菜单模型
        public DbSet<MenuModel> Menu { get; set; }
        //菜单视图
        public DbSet<MenuView> MenuView { get; set; }

        /**
         * 基础信息 - BaseInfo
         */
        //员工模型
        public DbSet<StaffModel> Staff { get; set; }
        //员工视图
        public DbSet<StaffView> StaffView { get; set; }

        //部门模型
        public DbSet<DepartmentModel> Department { get; set; }

        #region 博客

        /// <summary>
        /// 分类
        /// </summary>
        public DbSet<BlogCategory> BlogCategories { get; set; }
        
        /// <summary>
        /// 正文
        /// </summary>
        public DbSet<BlogText> BlogText { get; set; }
        
        /// <summary>
        /// 收藏
        /// </summary>
        public DbSet<BlogLikes> BlogLikes { get; set; }

        /// <summary>
        /// 收藏 视图
        /// </summary>
        public DbSet<BlogLikesView> BlogLikesView { get; set; }

        /// <summary>
        /// 博客系统配置表
        /// </summary>
        public DbSet<BlogSystemConfig> BlogSystemConfig { get; set; }
        
        /// <summary>
        /// 正文评论
        /// </summary>
        public DbSet<BlogComment> BlogComment { get; set; }


        #endregion

    }
}
